<template>
	<view class="content">
		<scroll-view scroll-y class="scroll">
			<image :src="imgUrl" mode="widthFix" class="img"></image>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type: '1',
			}
		},
		computed: {
			imgUrl() {
				return `/static/notice-${this.type}.png`
			}
		},
		onShow() {
			let curPage = getCurrentPages();
			let params = curPage[curPage.length - 1].options; //获取当前页面参数，如果有则返回参数的对象，没有参数返回空对象{}
			if (params.hasOwnProperty('type')) {
				const { type } = params
				this.type = type
			}
		},
		methods: {

		}
	}
</script>

<style lang="scss">
	.content {
		width: 100vw;
		height: 100vh;
		overflow: scroll;
		box-sizing: border-box;

		.scroll {
			width: 100%;
			height: 100%;
			font-size: 0;
		}

		.img {
			width: 100%;
		}
	}
</style>